Manages the camera within the component. More...
Manages the camera within the component.
At all time, the manager is responsible for the memory it allocates. External code should never deallocate memoyr returned by the function calls.
Camera* nkGraphics::CameraManager::createOrRetrieve | ( | const nkMemory::StringView & | name | ) |
Creates if unavailable, or retrieve if available, a camera attached to a name.
name | The name of the camera to retrieve. |
Camera* nkGraphics::CameraManager::get | ( | const nkMemory::StringView & | name | ) |
Retrieves an existant camera.
name | The name of the camera to retrieve. |
Camera* nkGraphics::CameraManager::getByIndex | ( | unsigned int | index | ) |
Retrieves an existant camera by index.
index | The index of the camera to retrieve. |
void nkGraphics::CameraManager::rename | ( | const nkMemory::StringView & | currentName, |
const nkMemory::StringView & | newName | ||
) |
Renames a camera and change the name associated to it.
currentName | The current name of the camera. |
newName | The new name to attach to the camera. |
void nkGraphics::CameraManager::erase | ( | const nkMemory::StringView & | name | ) |
Erases a camera an frees the memory attached to it.
name | The name of the camera to erase. |
Camera* nkGraphics::CameraManager::getActiveRenderCam | ( | ) | const |
Camera* nkGraphics::CameraManager::getActiveCullingCam | ( | ) | const |
Camera* nkGraphics::CameraManager::getActiveLodCam | ( | ) | const |
Camera* nkGraphics::CameraManager::getDefaultCam | ( | ) | const |
Camera* nkGraphics::CameraManager::getActiveContextCam | ( | ) | const |
Camera* nkGraphics::CameraManager::getContextRenderCam | ( | RenderContext * | context | ) |
context | The context from which to retrieve the render camera. |
Camera* nkGraphics::CameraManager::getContextCullingCam | ( | RenderContext * | context | ) |
context | The context from which to retrieve the culling camera. |
Camera* nkGraphics::CameraManager::getContextLodCam | ( | RenderContext * | context | ) |
context | The context from which to retrieve the lod camera. |
void nkGraphics::CameraManager::setActiveRenderCam | ( | Camera * | cam | ) |
Sets the active render cam to use. Serves as a reference for feeding shaders with matrices during a pass.
cam | The camera to use. |
void nkGraphics::CameraManager::setActiveCullingCam | ( | Camera * | cam | ) |
Sets the active culling cam to use. Serves as a reference for culling render queues rendered during a pass.
cam | The camera to use. |
void nkGraphics::CameraManager::setActiveLodCam | ( | Camera * | cam | ) |
Sets the active lod cam to use. Serves as a reference for selecting LOD during a pass.
cam | The camera to use. |
void nkGraphics::CameraManager::setDefaultCam | ( | Camera * | cam | ) |
Sets the default cam to use when no camera is specified for a pass.
cam | The camera to use. |
void nkGraphics::CameraManager::setActiveContextCam | ( | Camera * | cam | ) |
Sets the active context camera. Will be used by stages (LOD, culling...) that were not overwritten.
cam | The camera to use. |
void nkGraphics::CameraManager::setContextRenderCam | ( | RenderContext * | context, |
Camera * | cam | ||
) |
Sets the render camera associated with a context.
context | The context which camera is to be set. |
cam | The camera to use. |
void nkGraphics::CameraManager::setContextCullingCam | ( | RenderContext * | context, |
Camera * | cam | ||
) |
Sets the culling camera associated with a context.
context | The context which camera is to be set. |
cam | The camera to use. |
void nkGraphics::CameraManager::setContextLodCam | ( | RenderContext * | context, |
Camera * | cam | ||
) |
Sets the LOD camera associated with a context.
context | The context which camera is to be set. |
cam | The camera to use. |
void nkGraphics::CameraManager::resetRenderCamToActiveContext | ( | ) |
Resets the rendering cam to the one the active context sets.
void nkGraphics::CameraManager::resetCullingCamToActiveContext | ( | ) |
Resets the culling cam to the one the active context sets.
void nkGraphics::CameraManager::resetLodCamToActiveContext | ( | ) |
Resets the LOD cam to the one the active context sets.
void nkGraphics::CameraManager::resetRenderCamToDefault | ( | ) |
Resets the rendering cam to the default one.
void nkGraphics::CameraManager::resetCullingCamToDefault | ( | ) |
Resets the culling cam to the default one.
void nkGraphics::CameraManager::resetLodCamToDefault | ( | ) |
Resets the LOD cam to the default one.
void nkGraphics::CameraManager::prepareForContext | ( | RenderContext * | context | ) |
Prepare the active cameras with the ones that have been set for a context.
context | The context that should populate the active cameras. |